//
//  fansareaTests.swift
//  fansareaTests
//
//  Created by 张 on 2017/12/31.
//  Copyright © 2017年 张. All rights reserved.
//

import XCTest
@testable import fansarea

class fansareaTests: XCTestCase {
    
    var vc :AreaTableViewController!
    
    override func setUp() {
        super.setUp()
        let stroyborad = UIStoryboard(name: "Main", bundle: Bundle.main)
        vc = stroyborad.instantiateViewController(withIdentifier: "AreaTableVC") as! AreaTableViewController
        
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    
    
    func testSerachFilter() {
        vc.viewDidLoad()
        vc.serchFilter(text: "zhongguo")
        print("搜素结果数目：",vc.serarchResults.count,"区域总数：",vc.areas.count)
        XCTAssert(vc.serarchResults.count==1)
    }
    
    func testExample() {
        // This is an example of a functional test case.
        // Use XCTAssert and related functions to verify your tests produce the correct results.
    }
    
    func testPerformanceExample() {
        // This is an example of a performance test case.
        self.measure {
            // Put the code you want to measure the time of here.
        }
    }
    
}
